Skip to content

feat(nodevitals): native collectors and ksmCompat integration - #33

Merged
eightynine01 merged 1 commit into
mainfrom
feat/native-collectors-ksmcompat
Aug 12, 2026
Merged

feat(nodevitals): native collectors and ksmCompat integration#33
eightynine01 merged 1 commit into
mainfrom
feat/native-collectors-ksmcompat

Conversation

@eightynine01

Copy link
Copy Markdown
Contributor

Implement native node_* collectors and kube-state-metrics (ksmCompat) integration.

Key Changes:

  • Add internal/nodecompat (loadavg, entropy, procs, vmstat, uname, osrelease, filefd).
  • Add internal/ksmcompat for kube-state-metrics parity (kube_pod_*, kube_node_*, kube_deployment_* etc.).
  • Add internal/collector/heartbeat.go for nodevitals_up and build info.
  • Update Helm chart templates (configmap.yaml, _helpers.tpl) to render new config and vmagent annotations.
  • Add comprehensive cross-service compatibility test script compatibility-check.sh.

@eightynine01
eightynine01 merged commit 2436b76 into main Aug 12, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db75119cf1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/nodevitals/main.go
Comment on lines +129 to +132
extraFlags = append(extraFlags,
"--no-collector.loadavg",
"--no-collector.uname",
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Disable every upstream collector replaced by native metrics

When nodeExporter.enabled is used with the Helm default nativeCollectors: true, this only disables upstream loadavg and uname, but the new native exporter also emits node_filefd_*, node_entropy_*, node_procs_*, node_vmstat_*, and node_os_* while node_exporter v1.12.1 keeps its filefd, entropy, stat, vmstat, and os collectors enabled by default. Prometheus gathering treats duplicate series or inconsistent descriptors as scrape errors, so the node_exporter-compatible endpoint becomes partial/noisy by default; disable every upstream collector that native replaces, or don't enable the native replacement by default.

Useful? React with 👍 / 👎.

Comment on lines +149 to +152
ch <- prometheus.MustNewConstMetric(nodeStatusCapacityDesc, prometheus.GaugeValue, 16.0, node, "cpu", "core")
ch <- prometheus.MustNewConstMetric(nodeStatusCapacityDesc, prometheus.GaugeValue, 67108864000.0, node, "memory", "bytes")
ch <- prometheus.MustNewConstMetric(nodeStatusAllocatableDesc, prometheus.GaugeValue, 15.5, node, "cpu", "core")
ch <- prometheus.MustNewConstMetric(nodeStatusAllocatableDesc, prometheus.GaugeValue, 64424509440.0, node, "memory", "bytes")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Populate KSM node metrics from live node status

When ksmCompat.enabled is set, these lines always publish fixed CPU and memory capacity/allocatable values for every node instead of reading Kubernetes Node.status. On any node that is not exactly 16 cores with these memory totals, standard KSM capacity dashboards and alerts ingest plausible but false kube_node_status_* data; either fetch the values from the API or skip these series until real data is available.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants